

<%@ page import="com.portico.dept.solarch.ProjectTeamMember" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="thin" />
        <g:set var="entityName" value="${message(code: 'projectTeamMember.label', default: 'ProjectTeamMember')}" />
        <title><g:message code="default.create.label" args="[entityName]" /></title>
    </head>
    <body>
        %{--<div class="nav">--}%
            %{--<span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>--}%
            %{--<span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>--}%
        %{--</div>--}%
        <div class="body">
            <h1><g:message code="default.create.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${projectTeamMemberInstance}">
            <div class="errors">
                <g:renderErrors bean="${projectTeamMemberInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form action="save" >
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="projectRole"><g:message code="projectTeamMember.projectRole.label" default="Project Role" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: projectTeamMemberInstance, field: 'projectRole', 'errors')}">
                                    <g:select name="projectRole" from="${projectTeamMemberInstance.constraints.projectRole.inList}" value="${projectTeamMemberInstance?.projectRole}" valueMessagePrefix="projectTeamMember.projectRole"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="department"><g:message code="projectTeamMember.department.label" default="Department" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: projectTeamMemberInstance, field: 'department', 'errors')}">
                                    <g:select name="department" from="${projectTeamMemberInstance.constraints.department.inList}" value="${projectTeamMemberInstance?.department}" valueMessagePrefix="projectTeamMember.department"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="startDate"><g:message code="projectTeamMember.startDate.label" default="Start Date" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: projectTeamMemberInstance, field: 'startDate', 'errors')}">
                                    <g:datePicker name="startDate" precision="day" value="${projectTeamMemberInstance?.startDate}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="endDate"><g:message code="projectTeamMember.endDate.label" default="End Date" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: projectTeamMemberInstance, field: 'endDate', 'errors')}">
                                    <g:datePicker name="endDate" precision="day" value="${projectTeamMemberInstance?.endDate}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="note"><g:message code="projectTeamMember.note.label" default="Note" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: projectTeamMemberInstance, field: 'note', 'errors')}">
                                    <g:textArea name="note" cols="40" rows="5" value="${projectTeamMemberInstance?.note}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="active"><g:message code="projectTeamMember.active.label" default="Active" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: projectTeamMemberInstance, field: 'active', 'errors')}">
                                    <g:checkBox name="active" value="${projectTeamMemberInstance?.active}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="project"><g:message code="projectTeamMember.project.label" default="Project" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: projectTeamMemberInstance, field: 'project', 'errors')}">
                                    <g:select name="project.id" from="${com.portico.dept.solarch.Project.list()}" optionKey="id" value="${projectTeamMemberInstance?.project?.id}"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="user"><g:message code="projectTeamMember.user.label" default="User" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: projectTeamMemberInstance, field: 'user', 'errors')}">
                                    <g:select name="user.id" from="${com.portico.dept.solarch.Person.list()}" optionKey="id" value="${projectTeamMemberInstance?.user?.id}"  />
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
